Microsoft® Excel, part of the Microsoft® Office application suite, is one of the best-known examples of an office productivity application program. Excel is a menu-driven spreadsheet system that enables a user to create reports for manipulation and analysis of data. An Excel worksheet includes a grid of cells that specify particular constraints imposed on data. A cell may include a constant data value or a formula that evaluates to a data value. An important feature of certain office productivity applications, including Excel and other Microsoft® Office applications, is their capacity to be extended by macro commands and “add-ins”. In Excel, a macro is a series of commands stored as a Microsoft® Visual Basic® module. Add-ins are supplemental programs that provide enhanced, optional or customized features.
Office productivity applications typically provide the user with some ability to undo commands or actions performed by the user by way of the application user interface, and to redo undone actions. For example, when an Excel user types a value into a worksheet cell, this input action ordinarily can be undone, either by clicking “Undo” on the Edit menu or by using an Undo tool on the standard toolbar. In such applications, the undo operation is typically implemented by way of a stack. The items on the undo stack represent tracked, reversible user interface operations. Ordinarily, at a given time the top item on the undo stack is available to be undone. Each other item on the undo stack cannot be undone until it becomes the top of the stack.
In Excel and similarly-designed programs, operations associated with macros and add-ins that interact with the object model exposed by the application are not automatically tracked in the undo stack. In the Excel object model, an item can be set as the next item available for Undo (that is, the item is pushed on the stack). By design, most modifications to the Excel object model clear the Excel undo stack as a side effect. Thus, pushing an item on the undo stack causes that item to become the sole item on the stack. This may be undesirable for the user because, in the course of ordinary user interaction with an add-in, object model modifications that occur typically do not change the state of the spreadsheet as experienced by the user. Undoable operations are thus not treated in a consistent manner.